
<!DOCTYPE html>
<html lang="en" style="font-size:58px">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="srco/css.css">
</head>
<script type="text/javascript" src="srco/jquery-3.2.1.min.js"></script>
<style type="text/css">
	
</style>
<body>
	<div class="dyao">
			<img src="img/bcar.png" id="head" width="40">
			<p class="nick">hfk健康是福</p>
		“白”里挑一 ---OTT衬衣展一颗扣子=一句表白送我一颗扣子，为我点亮拼图点亮9张就有机会获得免单衬衣
	</div>
	<div class="tain">
		<img class="cr r1_c1" src="img/01.png">
		<img class="cr r1_c2" src="img/02.png">
		<img class="cr r1_c3" src="img/03.png">
		<img class="cr r2_c1" src="img/04.png">
		<img class="cr r2_c2" src="img/05.png">
		<img class="cr r2_c3" src="img/06.png">
		<img class="cr r3_c1" src="img/07.png">
		<img class="cr r3_c2" src="img/08.png">
		<img class="cr r3_c3" src="img/09.png">
		<div class="content">
			<div class="row">
				<div class="colum" data-num='1' id="r1_c1" ></div>
				<div class="colum" data-num='2' id="r1_c2" ></div>
				<div class="colum" data-num='3' id="r1_c3" ></div>
			</div>
			<div class="row">
				<div class="colum" data-num='4' id="r2_c1"></div>
				<div class="colum" data-num='5' id="r2_c2"></div>
				<div class="colum" data-num='6' id="r2_c3"></div>
			</div>
			<div class="row">
				<div class="colum" data-num='7' id="r3_c1"></div>
				<div class="colum" data-num='8' id="r3_c2"></div>
				<div class="colum" data-num='9' id="r3_c3"></div>
			</div>
		</div>
	</div>
	<div class="pli" id="plist">
	</div>
	<div class="bottom">
		<div class="blr left">为他点亮</div>
		<div class="blr right"><a id="part" href="#fdgfdg">我要参加</a>></div>
	</div>
	<div id="pop"></div>
</body>

<script type="text/javascript">

	function getUrlState(URL){
		// var xmlhttp = new ActiveXObject("microsoft.xmlhttp");



		var xmlhttp = new XMLHttpRequest();
		xmlhttp.open("GET",URL, false);
		try{
			xmlhttp.Send();
		}catch(e){
		}finally{
			var result = xmlhttp.responseText;
			if(result){
				if(xmlhttp.Status==200){
					return(true);
				}else{
					return(false);
				}
			}else{
				return(false);
			}
		}
	}

	getUrlState('baidu.com');
	var phtml = '',varc='',name='';
	var share_openid = location.hash;

	// 当前用户的openid
	var current_openid = '23424234234234';
	// 当前用户的头像
	var head_port = 'img/bcar.png';


	var oneword = [
	"可乐加冰，爱我走心",
	"后来的我们，认真且怂",
	"去浪，去辽阔",
	"你若安好，那还得了",
	"不是胖，是灵魂超重",
	"Forever Young",
	"确认过眼神，是不想理的人",
	" 美得花枝乱颤",
	"这！就是百里挑一"
	]
	$("#head").attr('src',head_port);
	/*start 点亮的朋友*/
	var array=[1,1,1,1,1,11,1,1,1,1]
	array.forEach( function(element, index) {
		varc = "img/bcar.png";
		name = "余量";
		phtml += '<div class="list"><img src="'+varc+'"><span>'+name+'</span><span>为你点亮</span></div>';
	});
	document.getElementById("plist").innerHTML = phtml;
	/*end 点亮的朋友*/

	/*start 点亮的图标*/
	for(var i=1;i<5;i++){
		var rd = Math.floor(Math.random()*9+1)
		// $(".tain img:nth-child("+rd+")").css('display','none');
	}
	/*end 点亮的图标*/
	function addLoadEvent(func){ 
		var oldonload=window.onload; 
			if(typeof window.onload!="function"){ 
				window.onload=func; 
			} 
			else{ 
				window.onload=function(){ 
				oldonload(); 
				func(); 
			} 
		}
	}
	addLoadEvent(function(){
		var w = document.body.clientWidth;
		console.log(w*0.9/900)
		$(".tain").css({"zoom":w*0.9/900});
	//	w=w>940?940:w;
		document.querySelector("html").style.fontSize = w/6.4+'px';
	});
	window.onresize = function(){
	    var w = document.body.clientWidth;
	    //w=w>940?940:w;
	    document.querySelector("html").style.fontSize = w/6.4+'px';
	};
	// document.getElementById('r2_c2')
	/*start 我要参加*/
	// openid
	$("#part").click(function(){
		current_openid = '#'+current_openid;
		$("#part").attr('href',current_openid);
	})
	/*end 我要参加*/
	/*start 为他点亮*/
	var lock = false;
	$(".bottom .left").click(function(){
		// 查询是否可以点亮
		lock = true;
	})
	$(".content").click(function(e){
		if(lock){
			lock = false;
			var id = $(e.target).data('num');
			var rd = Math.floor(Math.random()*9+1)
			$(".tain img:nth-child("+id+")").css('display','none');
			$("#pop").text(oneword[rd])
			$("#pop").css('display','block');
			setTimeout(function(){
				$("#pop").css('display','none');
			},1500)
		}
	})
	/*end 为他点亮*/
</script>
</html>